# include <bits/stdc++.h>
# define N 1000005
using namespace std;
char s[N];
string mp[105];
string a[7]={"","RGBBGR","BGRRGB","BRGGRB","GRBBRG","GBRRBG","RBGGBR"};
int stx,sty;
char ans[N];
int xx[]={1,0,0,-1};
int yy[]={0,-1,1,0};
char f[]={'D','L','R','U'};
char ccc[]={'R','G','B'};
mt19937 Rnd(1);
int mid=15;
int n;
int main()
{
    freopen("snake.in","r",stdin);
    freopen("snake.out","w",stdout);
    scanf("%s",s+1);
    n=strlen(s+1);
    mp[0]="                                                                                                  ";
    for(int i=1;i<=6;i++)
    {
        mp[i]=" ";
        for(int j=1;j<=mid/3;j++)
            mp[i]+=a[i];
        mp[i]+=' ';
    }
    for(int i=7;i<=mid*2;i++)
        mp[i]=mp[i-6];
    for(int i=mid-1;i<=mid+1;i++)
        for(int j=mid-1;j<=mid+1;j++)
            if(mp[i][j]==s[1])
                stx=i,sty=j;
    while(1)
    {
        bool died=0;
        int nowx=stx,nowy=sty;
        for(int i=2;i<=n;i++)
        {
            bool flag=0;
            if(Rnd()%2)
            {
                if(nowx<=mid && mp[nowx+1][nowy]==s[i])
                {
                    nowx++;
                    ans[i-1]='D';
                    continue;
                }
                if(nowx>mid && mp[nowx-1][nowy]==s[i])
                {
                    nowx--;
                    ans[i-1]='U';
                    continue;
                }
                if(nowy<=mid && mp[nowx][nowy+1]==s[i])
                {
                    nowy++;
                    ans[i-1]='R';
                    continue;
                }
                if(nowy>mid && mp[nowx][nowy-1]==s[i])
                {
                    nowy--;
                    ans[i-1]='L';
                    continue;
                }
            }
            else
            {
                if(nowy<=mid && mp[nowx][nowy+1]==s[i])
                {
                    nowy++;
                    ans[i-1]='R';
                    continue;
                }
                if(nowy>mid && mp[nowx][nowy-1]==s[i])
                {
                    nowy--;
                    ans[i-1]='L';
                    continue;
                }
                if(nowx<=mid && mp[nowx+1][nowy]==s[i])
                {
                    nowx++;
                    ans[i-1]='D';
                    continue;
                }
                if(nowx>mid && mp[nowx-1][nowy]==s[i])
                {
                    nowx--;
                    ans[i-1]='U';
                    continue;
                }
            }
            vector<int> v;
            if(Rnd()%2)
                v={0,1,2,3};
            else
                v={3,2,1,0};
            for(auto j:v)
            {
                if(mp[nowx+xx[j]][nowy+yy[j]]==s[i])
                {
                    flag=1;
                    ans[i-1]=f[j];
                    nowx+=xx[j],nowy+=yy[j];
                    break;
                }
            }
            if(!flag)
            {
                died=1;
                break;
            }
        }
        if(!died)
            break;
    }
    for(int i=1;i<=mid*2;i++,cout<<'\n')
        for(int j=1;j<=mid*2;j++)
            cout<<mp[i][j];
    cout<<stx<<' '<<sty<<'\n';
    for(int i=1;i<n;i++)
        cout<<ans[i];
    cout<<'\n';
    int nowx=stx,nowy=sty;
    for(int i=1;i<=n;i++)
    {
        assert(nowx>=1 && nowx<=30 && nowy>=1 && nowy<=30 && mp[nowx][nowy]==s[i]);
        if(i!=n)
            if(ans[i]=='U')
                nowx--;
            else if(ans[i]=='D')
                nowx++;
            else if(ans[i]=='L')
                nowy--;
            else
                nowy++;
    }
    return 0;
}